package com.ds.model;

public class AjaxResult {
    private int status;
    private String massage;
    private Object data;

    public static AjaxResult ok( String massage, Object data){
        return new AjaxResult(200,massage,data);
    }
    public static AjaxResult ok( String massage){
        return new AjaxResult(200,massage,null);
    }
    public static AjaxResult error( String massage, Object data){
        return new AjaxResult(200,massage,data);
    }
    public static AjaxResult error( String massage){
        return new AjaxResult(500,massage,null);
    }

    private AjaxResult(){

    }

    private AjaxResult(int status, String massage, Object data) {
        this.status = status;
        this.massage = massage;
        this.data = data;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getMassage() {
        return massage;
    }

    public void setMassage(String massage) {
        this.massage = massage;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
